<form name="admin_group_mediawiki" class="admin_group_mediawiki" method="post" action="{{ route }}">
    <h1>{{ admin_title }}</h1>

    <ul class="nav nav-tabs">
        <li class="active">
            <a href="?group_id={{ group_id }}&pane=permissions">{{ permissions_label }}</a>
        </li>
        <li>
            <a href="?group_id={{ group_id }}&pane=language">{{ language_label }}</a>
        </li>
    </ul>

    {{# can_show_options }}
        <h2>{{ options_title }}</h2>
        <div class="mediawiki-options">
            <label class="checkbox" for="mw-embedded">
                <input type="checkbox" id="mw-embedded" name="enable_compatibility_view" {{# is_compatibility_enabled_value }} checked="checked" {{/ is_compatibility_enabled_value }} value="1" />
                {{ compatibility_view_text }}
            </label>
        </div>
    {{/ can_show_options }}

    <h2>{{ access_control_title }}</h2>
    <p>{{ access_control_intro }}</p>
    <div>
        <div class="forge_mw_access_read_control">
            <label>{{ read }}</label>
            <select
                title="{{ read }}"
                multiple="multiple"
                name="read_ugroups[]"
                size="8"
            >
                {{# read_ugroups }}
                <option value="{{ value }}" {{# selected }}selected="selected"{{/ selected }}>{{ label }}</option>
                {{/ read_ugroups }}
            </select>
        </div>

        <div class="forge_mw_access_write_control">
            <label>{{ write }}</label>
            <select
                title="{{ write }}"
                multiple="multiple"
                name="write_ugroups[]"
                size="8"
            >
                {{# write_ugroups }}
                <option value="{{ value }}" {{# selected }}selected="selected"{{/ selected }}>{{ label }}</option>
                {{/ write_ugroups }}
            </select>
        </div>
        <div class="clearfix"></div>
    </div>

    <h2>{{ title }}</h2>
    <div class="forge_mw_help_block">
        <p>{{ help_intro }}</p>
        <p>{{{ help_link }}}</p>
        <p>{{ help_project }}</p>
    </div>
    <div>
        {{# groups_permissions }}
        <div>
            <div class="forge_mw_mapping_available">
                <div>{{ tuleap_group_label }}</div>
                {{# available_groups }}{{> selectbox }}{{/ available_groups }}
            </div>
            <div class="forge_mw_btn btn-group btn-group-vertical">
                <button class="forge_mw_add_ugroup btn"><i class="icon-chevron-right"></i></button>
                <button class="forge_mw_remove_ugroup btn"><i class="icon-chevron-left"></i></button>
            </div>
            <div class="forge_mw_mapping_selected">
                <div>{{ mediawiki_group_label }}</div>
                <input type="hidden" name="{{ hidden_selected_groups_name }}" class="forge_mw_hidden_selected_groups" value="{{ hidden_selected_groups_value }}"/>
                {{# selected_groups }}{{> selectbox }}{{/ selected_groups }}
            </div>
        </div>
        <div class="forge_mw_mapping_spacer"></div>
        {{/ groups_permissions }}
    </div>

    <div class="admin_group_mediawiki_submit">
        <input type="submit" name="submit" value="{{ submit_label }}" class="btn btn-primary"/>
        {{ or_string }}
        <input type="submit" name="restore" value="{{ restore_label }}" class="btn btn-danger"/>
    </div>
</form>
